#ifndef VBLANKTEXTEDITOR_H
#define VBLANKTEXTEDITOR_H

QT_FORWARD_DECLARE_CLASS(QsciScintilla)

class QTextEdit;
class QCodeEdit;
class QFormatConfig;
class QFormatScheme;
class QLanguageFactory;

class VBlankTextEditor : public QObject
{
	Q_OBJECT

public:
	VBlankTextEditor(QWidget *parent);
	~VBlankTextEditor();

public:
	QWidget* widget() const { return m_bkgWidget; }

	QString text() const;//m_edit->toPlainText(); }
	void setText(const QString& text);

	QFont font() const { return m_edit->currentFont(); }
	void setFont(const QFont& font);

	QTextOption::WrapMode wordWrapMode() const { return m_edit->wordWrapMode(); }
	void setWordWrapMode(QTextOption::WrapMode wordWrapMode) { m_edit->setWordWrapMode(wordWrapMode); }

	int tabWidth() const { return 0; }
	void setTabWidth(int tabWidth);

	void setCursorPos(int line, int column);

private slots:
	void textChange(bool b);

signals:
	void textChanged();

private:
	QWidget* m_bkgWidget;
	QTextEdit* m_edit;
	QCodeEdit* m_codeEdit;	
	QFormatConfig *m_formatConfig;
	QFormatScheme *m_formats;
	QLanguageFactory *m_languages;
	QsciScintilla* m_qsciEditor;
	
};

#endif // VBLANKTEXTEDITOR_H
